﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
using DevExpress.XtraEditors;
using DevExpress.XtraGrid.Demos.util;
using mendian;
using Luna小店.DTO;
using DevExpress.XtraGrid.Views.Tile;
using Luna小店.UC.面料库存.门户UC.service;

namespace Luna小店.UC.面料库存.门户UC
{
    public partial class XtraUserControl出入库申请 : DevExpress.XtraEditors.XtraUserControl
    {
        private List<DTO物料需求> DTO物料需求 = new List<DTO物料需求>();
        private String applyType;
        public XtraUserControl出入库申请()
        {
            InitializeComponent();
            List<DTO出入库申请> DTO出入库申请s = 面料门户Service.get出入库申请List();
            foreach (DTO出入库申请 DTO出入库申请 in DTO出入库申请s)
            {
                this.DTO物料需求.Add(new DTO物料需求(DTO出入库申请));
            }
            this.gridControl物料需求.DataSource = this.DTO物料需求;
        }

        private void tileView物料需求_Click(object sender, EventArgs e)
        {
            this.applyType = FunctionHelper.getTileView(this.tileView物料需求, this.tileView物料需求.FocusedRowHandle, "applyType");
            if ("物料需求".Equals(this.applyType))
            {
                new Form订单领料出库().ShowDialog();
                this.tileView物料需求.RefreshData();
            }
        }
        
    }

}
